package com.baizw.cultivation.module.admin.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.List;

/**
 * 用户导航
 *
 * @author 剧终1204
 * @version V1.0
 * @date 2020年06月09日 11:37
 */
@Data
@ApiModel("用户菜单对象")
public class UserMenu implements Serializable {

    @ApiModelProperty("资源ID")
    private Long id;

    @ApiModelProperty("父级ID")
    private Long parentId;

    @ApiModelProperty("资源名称")
    private String name;

    @ApiModelProperty("元数据")
    private Meta meta;

    @ApiModelProperty("组件名称")
    private String component;

    @ApiModelProperty("路由")
    private String path;

    @ApiModelProperty("转发路由")
    private String redirect;

    @ApiModelProperty("资源权限")
    private String permission;

    @ApiModelProperty("子集菜单")
    private List<UserMenu> children;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class Meta implements Serializable {
        private String icon;
        private String title;
        private String target;
        private List<String> permission;
        private Boolean show;
        private Boolean keepAlive;
        private Boolean hiddenHeaderContent;
    }
}
